home *** CD-ROM | disk | FTP | other *** search
/ BCI NET 2 / BCI NET 2.iso / archives / diskmags / shoah_s_iss1.lha / source / Copper.s < prev    next >
Encoding:
Text File  |  1991-06-13  |  3.2 KB  |  140 lines

  1. ;      _______  ___                    ___        _______
  2. ;     /°-     \/. /    _____   ____   / ./       /°-     \
  3. ;     \   \___//  \___/°    \_/°   \_/   \___    \   \___/
  4. ;    _/\__    \      ~\_  /\  \  /\ ~\      °\_ _/\__    \
  5. ;    \\       /   /\   /  \/. /  \/   \ //\   / \\       /
  6. ;     \______/\__/  \_/\_____/\____/\_/_/  \_/ o \______/ Issue 1
  7.  
  8. ;Simple copper Display
  9. ;By Squize    9/12/94
  10.  
  11.     opt c-                ;Always set this !
  12.  
  13.     Section    Copper,Code        ;Always put the code in public mem,
  14.                     ;so people with Fast Ram get the
  15.                     ;benefit
  16.  
  17. ;*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*
  18.  
  19.     include    SHOAH.s:SHOAH_Libs/Macros.lib
  20.                     ;I've made some nice macros to
  21.                     ;make life that little bit easier
  22.  
  23. ;*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*
  24.  
  25. Start:
  26.     bsr.s    TakeSystem        ;Kill the OS
  27.     tst    d0            ;Did we have an error ?
  28.     bne.s    Error            ;Yes, so quit
  29.  
  30.     bsr    Init            ;Run our little example
  31.  
  32.     bsr    RestoreSystem        ;Finished, so restore the OS
  33.  
  34.     moveq.l    #0,d0            ;Keep Mr.CLI happy
  35. Error:
  36.     rts
  37.  
  38. ;*+*+*+*+*+*+*+*+*+*+*+- Library Routines -+*+*+*+*+*+*+*+*+*+*+*+*+*+*+
  39.     
  40.     include    SHOAH.s:SHOAH_Libs/Startup.lib
  41.  
  42. ;*+*+*+*+*+*+*+*+*+*+*+- Start up Routines -+*+*+*+*+*+*+*+*+*+*+*+*+*+*
  43. Init:
  44.     Copper_Set    Copperlist        ;This is my macro for turning
  45.                         ;on the copperlist
  46.  
  47.     move    #%1000001010000000,$96(a5)    ;DMA:Copper on !
  48.  
  49.     bsr.s    Main                ;Now run the main loop
  50.  
  51.     rts                    ;All done, so go back to
  52.                         ;"RestoreSystem"
  53.  
  54. ;*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*
  55. ;*+*+*+*+*+*+*+*+*+*+*+- The Main Loop -+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*
  56. ;*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*
  57. MAIN:
  58.  
  59. ;*+*+*+    Check for quit
  60.  
  61.     Mouse_button    Main        ;Another macro, if the left mouse
  62.                     ;button is not pressed then it'll
  63.                     ;loop to main
  64.     rts                ;LMB pressed, so return to "Init"
  65.  
  66. ;*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*
  67. ;*+*+*+*+*+*+*+*+*+*+*+- Chip-Ram Stuff -+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+
  68.  
  69.     section    ChipRam,Code_c        ;All copperlists/bitplanes/sound/
  70.                     ;sprites/bobs etc. MUST be in
  71.                     ;ChipRam !
  72.  
  73. ;*+*+*+*+*+*+*+*+*+*+*+- Copper Lists -+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+
  74.  
  75. Copperlist:
  76.  
  77.     dc.w $0180,$0111        ;Set the first paper colour
  78.         dc.l $8001fffe        ;First wait
  79.     dc.w $0180,$0222
  80.         dc.l $8101fffe
  81.     dc.w $0180,$0333
  82.         dc.l $8201fffe
  83.     dc.w $0180,$0444
  84.         dc.l $8301fffe
  85.     dc.w $0180,$0555
  86.         dc.l $8401fffe
  87.     dc.w $0180,$0666
  88.         dc.l $8501fffe
  89.     dc.w $0180,$0777
  90.         dc.l $8601fffe
  91.     dc.w $0180,$0888
  92.         dc.l $8701fffe
  93.     dc.w $0180,$0999
  94.         dc.l $8801fffe
  95.     dc.w $0180,$0aaa
  96.         dc.l $8901fffe
  97.     dc.w $0180,$0bbb
  98.         dc.l $8a01fffe
  99.     dc.w $0180,$0ccc
  100.         dc.l $8b01fffe
  101.     dc.w $0180,$0ddd
  102.         dc.l $8c01fffe
  103.     dc.w $0180,$0eee
  104.         dc.l $8d01fffe
  105.     dc.w $0180,$0fff
  106.         dc.l $8e01fffe
  107.     dc.w $0180,$0eee
  108.         dc.l $8f01fffe
  109.     dc.w $0180,$0ddd
  110.         dc.l $9001fffe
  111.     dc.w $0180,$0ccc
  112.         dc.l $9101fffe
  113.     dc.w $0180,$0bbb
  114.         dc.l $9201fffe
  115.     dc.w $0180,$0aaa
  116.         dc.l $9301fffe
  117.     dc.w $0180,$0999
  118.         dc.l $9401fffe
  119.     dc.w $0180,$0888
  120.         dc.l $9501fffe
  121.     dc.w $0180,$0777
  122.         dc.l $9601fffe
  123.     dc.w $0180,$0666
  124.         dc.l $9701fffe
  125.     dc.w $0180,$0555
  126.         dc.l $9801fffe
  127.     dc.w $0180,$0444
  128.         dc.l $9901fffe
  129.     dc.w $0180,$0333
  130.         dc.l $9a01fffe
  131.     dc.w $0180,$0222
  132.         dc.l $9b01fffe
  133.     dc.w $0180,$0111
  134.         dc.l $9c01fffe
  135.     dc.w $0180,$0000            ;phew...
  136.  
  137.     dc.l $fffffffe
  138.     dc.l $fffffffe
  139.  
  140.